<form action="{{route('goods.batch_operation')}}">
    <table class="table table-responsive" id="goods-table">
    <thead>
        <th><button class="btn btn-success" type="submit">批量修改</button></th>
        <th>ID</th>
        <th>分类</th>
        <th>编号</th>
        <th>名称</th>
        <th>补充名称</th>
        <th>点击量</th>
        <th>销售量</th>
        <th>数量</th>
        <th>市场价</th>
        <th>优惠价</th>
        <th>单位</th>
        <th>销售开始时间</th>
        <th>销售结束时间</th>
        <th>是否销售</th>
        {{--<th>是否佳品</th>--}}
        {{--<th>是否新品</th>--}}
        {{--<th>是否热卖</th>--}}
        <th>每日可购买数</th>
        <th>是否及时分拣</th>
        <th>排序值(越小越靠前)</th>
        {{--<th>描述</th>--}}
        <th>封面</th>
        <th>轮播图</th>
        <th>详情图</th>
        <th colspan="3">操作</th>
    </thead>
    <tbody>
    @foreach($goods as $v)
        <tr>
            <td><input type="checkbox" name="ids[]" value="{{ $v->id }}"></td>
            <td>{!! $v->id !!}</td>
            <td>
                @foreach($v->categories as $cat)
                {{ $cat->name }}
                @endforeach
            </td>
            <td>{!! $v->sn !!}</td>
            <td>{!! $v->name !!}</td>
            <td>{!! $v->title !!}</td>
            <td>{!! $v->click_count !!}</td>
            <td>{!! $v->sales_count !!}</td>
            <td>{!! $v->number !!}</td>
            <td>{!! $v->market_price !!}</td>
            <td>{!! $v->sale_price !!}</td>
            <td>{!! $v->unit !!}</td>
            <td>{!! $v->sale_start_date !!}</td>
            <td>{!! $v->sale_end_date !!}</td>
            <td>{!! $v->is_on_sale==1?'是':'否' !!}</td>
            {{--<td>{!! $v->is_best !!}</td>--}}
            {{--<td>{!! $v->is_new !!}</td>--}}
            {{--<td>{!! $v->is_hot !!}</td>--}}
            <td>{!! $v->day_buy_number !!}</td>
            <td>{!! $v->is_timely_sort==1?'是':'否' !!}</td>
            <td>{!! $v->sort !!}</td>
            {{--<td>{!! $v->desc !!}</td>--}}
            <td>@tpic($v->image)</td>
            <td>
                @foreach($v->slideshow as $content)
                    @tpic($content->url)
                @endforeach
            </td>
            <td>
                @foreach($v->contents as $content)
                    @tpic($content->url)
                @endforeach
            </td>
            <td>
{{--                {!! Form::open(['route' => ['goods.destroy', $v->id], 'method' => 'delete']) !!}--}}
                <div class='btn-group'>
                    <a href="{!! route('goods.show', [$v->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-eye-open"></i></a>
                    <a href="{!! route('goods.edit', [$v->id]) !!}" class='btn btn-default btn-xs'><i class="glyphicon glyphicon-edit"></i></a>
                    <a href="{!! route('goods.del', [$v->id]) !!}" onclick="return confirm('Are you sure?')" class='btn btn-default btn-xs'>删除</a>
{{--                    {!! Form::button('<i class="glyphicon glyphicon-trash"></i>', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!}--}}
                </div>
{{--                {!! Form::close() !!}--}}
            </td>
        </tr>
    @endforeach
    </tbody>
</table>
</form>